#ifndef _GEOMETRY_SHAPE_H_
#define _GEOMETRY_SHAPE_H_

#include "Ray.h"
#include "../Basis/Vector3.h"
#include "../Basis/Vector2.h"
#include "../Basis/rgb.h"


class rgb;
class Texture;

struct HitRecord 
{
	float t;
	Vector3 normal;
	Vector2 uv;			//	for 2D textures
	Vector3 hit_p;		//	the point of intersection
	Texture* hit_tex;	//	the nearest intersected object's texture
};

class Shape
{
public:
	virtual bool hit(const Ray& r, float tmin, float tmax, float time,
		HitRecord &record) const = 0;
	virtual bool shadowHit(const Ray& r, float tmin, float tmax, float time)
		const = 0;
};

#endif